package com.study.javaBasic.proxy;

/**
 * The type Send msg proxy.
 *
 * @Name: SendMsgProxy
 * @Description: java类作用描述
 * @Author: yn
 * @CreateDate: 2021 /12/22 15:44
 * @Remark: 特殊说明
 * @Version: 1.0
 */
public class SendMsgProxy implements ISendMsg {

    /**
     * Instantiates a new Send msg proxy.
     */
    public SendMsgProxy() {
    }

    /**
     * Instantiates a new Send msg proxy.
     *
     * @param sendMsg the send msg
     */
    public SendMsgProxy(ISendMsg sendMsg) {
        this.sendMsg = sendMsg;
    }

    private ISendMsg sendMsg;

    @Override
    public void send(String msg) {
        System.out.println("++++开始+++++");
        sendMsg.send(msg);
        System.out.println("++++结束+++++");
    }
}
